package base.day07;

import javax.crypto.ShortBufferException;
import javax.swing.*;

public class study4 {
    public static void main(String[] args) {
        JFrame jf = new JFrame();
        jf.setTitle("日期和时间");
        jf.setSize(400, 300);
        jf.setDefaultCloseOperation(3);
        jf.setLocationRelativeTo(null);
        jf.setAlwaysOnTop(true);
        jf.setLayout(null);

        //日期
        JLabel date = new JLabel("日期");
        date.setBounds(50, 50, 100, 20);
        jf.add(date);
        //显示日期
        JLabel show_date = new JLabel("x年x月x日");
        show_date.setBounds(50, 80, 200, 20);
        jf.add(show_date);
        //时间
        JLabel time = new JLabel("时间");
        time.setBounds(50, 150, 100, 20);
        jf.add(time);
        //显示时间
        JLabel show_time = new JLabel("xx:xx");
        show_time.setBounds(50, 180, 200, 20);
        jf.add(show_time);

        jf.setVisible(true);
    }
}
